const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
        $: 'jquery',
        jQuery: 'jquery',
        Popper: ['popper.js', 'default'] // bootstrap 中的一些组件依赖
      })
    ]
  },
  devServer: {
    host: "127.0.0.1",
    port: 8085,
    open: true,
    hot: "only",
    proxy: {
      "/api": {//配置跨域代理
        target: "http://127.0.0.1:8080",
        secure: false,
        changOrigin: true,
        pathRewrite: {
          "^/api": "/"
        }
      }
    }
  }
})
